package com.hq.door.pojo;

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToMany;


/**
 * AbstractTInstitute entity provides the base persistence definition of the TInstitute entity. @author MyEclipse Persistence Tools
 */
@MappedSuperclass

public abstract class AbstractTInstitute  implements java.io.Serializable {


    // Fields    

     private Integer id;
     private String name;
     private String code;
     private Timestamp modifiedTime;
     private Integer modifiedBy;
     private Set<TMajor> TMajors = new HashSet<TMajor>(0);


    // Constructors

    /** default constructor */
    public AbstractTInstitute() {
    }

	/** minimal constructor */
    public AbstractTInstitute(String name, String code) {
        this.name = name;
        this.code = code;
    }
    
    /** full constructor */
    public AbstractTInstitute(String name, String code, Timestamp modifiedTime, Integer modifiedBy, Set<TMajor> TMajors) {
        this.name = name;
        this.code = code;
        this.modifiedTime = modifiedTime;
        this.modifiedBy = modifiedBy;
        this.TMajors = TMajors;
    }

   
    // Property accessors
    @Id @GeneratedValue
    
    @Column(name="id", unique=true, nullable=false)

    public Integer getId() {
        return this.id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }
    
    @Column(name="name", nullable=false, length=100)

    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    @Column(name="code", nullable=false, length=30)

    public String getCode() {
        return this.code;
    }
    
    public void setCode(String code) {
        this.code = code;
    }
    
    @Column(name="modified_time", length=19)

    public Timestamp getModifiedTime() {
        return this.modifiedTime;
    }
    
    public void setModifiedTime(Timestamp modifiedTime) {
        this.modifiedTime = modifiedTime;
    }
    
    @Column(name="modified_by")

    public Integer getModifiedBy() {
        return this.modifiedBy;
    }
    
    public void setModifiedBy(Integer modifiedBy) {
        this.modifiedBy = modifiedBy;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="TInstitute")

    public Set<TMajor> getTMajors() {
        return this.TMajors;
    }
    
    public void setTMajors(Set<TMajor> TMajors) {
        this.TMajors = TMajors;
    }
   








}